package com.itheima.demo.demo10;

import java.io.*;

public class Buffersecnd {
    public static void main(String[] args) throws IOException {
        long a = System.currentTimeMillis();
        FileInputStream fis=new FileInputStream("D:\\Day01\\JavaEE进阶_最终章.CHM");
        BufferedInputStream bis=new BufferedInputStream(fis);
        FileOutputStream fos=new FileOutputStream("D:\\test.CHM");
        BufferedOutputStream bos=new BufferedOutputStream(fos);
        int len=0;
        byte[]b=new byte[1024];
        while ((len = bis.read(b)) == -1){
           bos.write(b,0,len);
        }
        bos.close();
        bis.close();
        long l = System.currentTimeMillis();
        System.out.println(l-a);


    }
}
